<template>
  <view class="seal">
    <view class="box">
      <tki-barcode
        ref="barcode"
        :show="show"
        :format="format"
        :cid="cid"
        :val="val"
        :unit="unit"
        :opations="opations"
        :onval="onval"
        :loadMake="loadMake"
        @result="barresult"
      />
    </view>
  </view>
</template>

<script>
import tkiBarcode from "@/components/tki-barcode/tki-barcode.vue";
export default {
  data() {
    return {
      show: true,
      format: "code128",
      cid: "",
      val: "1",
      unit: "",
      mid: "",
      proId: "",
      opations: {
        width: 4,
        height: 100,
        textPosition: "top",
        textMargin: 10,
        text: `${this.mid}#${this.proId}`,
        textAlign: "left",
      },
      onval: "",
      loadMake: true,
    };
  },
  methods: {
    barresult(e) {
      // console.log(e);
    },
  },
  components: { tkiBarcode },
  onLoad(opation) {
    this.opations.text=`${opation.proId}`
  },
};
</script>

<style lang="scss" scoped>
.seal{
  // padding: 20rpx;
}
.box {
  // width: 100%;
  // margin: 100rpx auto;
}
</style>
